<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@include file="/common/common.jsp"%>
<%@ page import="com.chanyachting.emall.util.*" %>
<%@ page import="java.util.*" %>

<%@ page import="com.chanyachting.emall.domain.*" %>
<%@ page import="com.chanyachting.emall.util.RequestUtil" %>
<%@ page import="com.chanyachting.emall.service.*" %>
<%@ page import="com.chanyachting.emall.serviceImpl.*" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="keywords" content="" /> 
<meta name="description" content="" />
<link href="css/import.css" type="text/css" rel="stylesheet" />
<title></title>

</head>

<body>
<div class="tab_box">
	<div class="tab_menu">
    	<a href="#" class="current">会员功能菜单列表</a>
    </div>
	
</div>
<table width="90%" border="0" align="center" cellpadding="0" cellspacing="0" class="yes_border">
 
  <tr>
    <td colspan="4" align="center" bgcolor="#E7E7E7"><table width="100%" border="0" cellspacing="0" cellpadding="0" class="no_border">
      <tr>
        <td width="15%" align="center"></td>
        <td align="center">&nbsp;</td>
        <td width="15%" align="center"></td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <th  align="center">编号</th>
    <th  align="center">菜单组</th>
    <th  align="center" width="30%">菜单列表</th>
    <th  align="center" width="25%">操作</th>
  </tr>
  
  
  <%
  
  	List list=(List)new RequestUtil(request).getAttribute("menugroupList",new ArrayList());
  
  	Menugroup  mg=null;
  
  	if(list!=null && list.size()>0){
  		
  		for(int i=0;i<list.size();i++){
  			
  			mg=(Menugroup)list.get(i);
  %>
  <tr>
  <form name="<%=i %>" action="" method="post">
  
    <td align="center"><%=mg.getId() %></td>
    <td align="center"><%=mg.getName() %></td>
	<td align="center">--</td>
    <td align="center">
    	<a href="menugroup.do?method=delete&id=<%=mg.getId() %>" onclick="return confirm('是否确认删除？');">删除组</a> &nbsp;&nbsp;&nbsp;&nbsp;
    	<a href="opertionmenu.do?method=create&groupId=<%=mg.getId() %>">添加菜单</a>
    </td>
    
   
   </form>
  </tr>
  
  <%
	  		List menuList=mg.getMenuList();
	  
	  		if(menuList!=null && menuList.size()>0){
	  			
	  			Opertionmenu menu=null;
	  			
	  			for(int j=0;j<menuList.size();j++){
	  				
	  				menu=(Opertionmenu)menuList.get(j);
	  %>
	  	<tr>
	  		<td>&nbsp;</td>
	  		<td>&nbsp;</td>
	  		<td align="right"><%= menu.getName() %>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;  
	  			<a href="opertionmenu.do?method=delete&id=<%=menu.getId() %>" onclick="return confirm('是否确认删除?');">删除菜单</a>
	  		</td>
	  		<td>&nbsp;</td>
	  	</tr>
	  
	  <%
	  				
	  			}
	  			
	  		}
  			
  		}

  	}
  
  %>

  <tr>
    <td colspan="4" bgcolor="#E7E7E7"><table width="100%" border="0" cellspacing="0" cellpadding="0" class="no_border">
      <tr>
        <td width="15%" align="center"></td>
        <td align="center">&nbsp;</td>
        <td width="15%" align="center"></td>
      </tr>
    </table></td>
  </tr>
 
</table>
<p>&nbsp;</p>
</body>
</html>

